<?php declare(strict_types=1);
/**
 * @author      xianganyall <xianganyall@gmail.com>
 * @copyright   2023-2025 owner
 **/

namespace Srv\Apps\Apis\Common\DefCtl;

final class DefAreaAllCtl extends DefAbstract
{
    private const TABLE_NAME                = 'def_area_all';
    private const FIELD_ID                  = 'dall_id';
    private const FIELD_CODE                = 'dall_code';
    private const FIELD_NAME                = 'dall_name';
    private const FIELD_COUNTRY             = 'dall_country';
    private const FIELD_PROVINCE            = 'dall_province';
    private const FIELD_CITY                = 'dall_city';
    public const EXT_COUNTRY                = 'country';
    public const EXT_PROVINCE               = 'province';
    public const EXT_CITY                   = 'city';
    public const EXT_NAME                   = 'name';

    /**
     * @return static
     * tag
     */
    public static function tag():self
    {
        $fieldExtList   = [
            self::EXT_COUNTRY   => self::FIELD_COUNTRY,
            self::EXT_PROVINCE  => self::FIELD_PROVINCE,
            self::EXT_CITY      => self::FIELD_CITY,
            self::EXT_NAME      => self::FIELD_NAME,
        ];
        return parent::tag()->config(self::TABLE_NAME, self::FIELD_ID, self::FIELD_CODE, $fieldExtList);
    }
}